package com.zhiwei.most.views

import android.content.Context
import android.graphics.Color
import android.util.AttributeSet
import androidx.appcompat.widget.LinearLayoutCompat
import com.blankj.utilcode.util.SizeUtils
import com.zhiwei.most.R

/**
 * Create by zhiweizhu on 2022/3/1
 * 作为一个标题的使用
 */
class WatchTitleView @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null
) : LinearLayoutCompat(context, attrs) {

    private var mTitle: String
    private var mTitleColor: Int
    private var mTitleSize: Int

    init {
        val typeValue = context.obtainStyledAttributes(attrs, R.styleable.WatchTitleView)
        mTitle = typeValue.getString(R.styleable.WatchTitleView_wtText) ?: ""
        mTitleColor = typeValue.getColor(R.styleable.WatchTitleView_wtTextColor, Color.WHITE)
        mTitleSize = typeValue.getDimensionPixelSize(R.styleable.WatchTitleView_wtTextSize, SizeUtils.sp2px(30f))

        typeValue.recycle()
    }








}